<section class="sidebar">
    <!-- Sidebar user panel -->
    <div class="user-panel">
        <div class="pull-left image">
            <img src="/static/images/logo.png" class="img-circle" alt="User Image" />
        </div>
        <div class="pull-left info">
            <p><{$admin.nickname}></p>
            <a href="#"><i class="fa fa-circle text-success"></i> 在线</a>
        </div>
    </div>
    <!-- search form -->
    <form action="#" method="get" class="sidebar-form">
        <div class="input-group">
            <input type="text" name="q" class="form-control" placeholder="搜索..." />
            <span class="input-group-btn"> <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i> </button> </span>
        </div>
    </form>
    <!-- /.search form -->
    <!-- sidebar menu: : style can be found in sidebar.less -->
    <ul class="sidebar-menu" id="sidebar-menu" data-widget="tree">
        <li class="header">操作导航</li>



     <?php foreach($navigation as $key => $val ){  ?>
         <li class="treeview">
             <a href="<{$val['url']}>">
                 <i class="fa fa-reorder"></i>
                 <span><{$val['title']}></span>
                 <span class="pull-right-container">
                     <i class="fa fa-angle-left pull-right"></i>
                 </span>
             </a>
             <?php if(isset($val['sub'])){?>
             <ul class="treeview-menu">
                 <?php foreach($val['sub'] as $k => $v ){ ?>
                     <?php if(in_array($v['permission'],$admin->permission) || $admin->is_super ){ ?>
                        <li class="<?php if($v['permission'] == $permission){ echo 'active active-sub'; } ?>"><a href="<{$v['url']}>"><i class="fa fa-circle-o"><{$v['title']}></i></a></li>
                     <?php } ?>
                 <?php } ?>
             </ul>
             <?php } ?>
         </li>
     <?php } ?>


    </ul>
</section>